package StringBufferExercise;

import java.util.Scanner;

public class StringBufferReverse {
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String input = sc.nextLine();

        StringBuffer stringBuffer = new StringBuffer(input);
        String reversed = stringBuffer.reverse().toString();

        System.out.println("反转后的字符串为：" + reversed);
    }
}
